// Promise.reject( reason ) 方法返回一个带有 拒绝原因 的 Promise 实例

/*
let executor = ( resolve , reject ) => {
    // 通过调用 reject 函数来拒绝承诺
    reject( '你是个好人，你值得拥有更好的' );
}
let promise = new Promise( executor );
*/

let promise = Promise.reject( '你是个好人，你值得拥有更好的' );
console.log( promise );

/*
promise.then( param => console.log( '已兑现: ' , param ) )
       .catch( reason => console.log( '已拒绝: ' , reason ) ); */

let onFulfilled = param => console.log( '已兑现: ' , param ) ;
let onRejected = reason => console.log( '已拒绝: ' , reason ) ;

promise.then( onFulfilled , onRejected );